package cave.renderer;

public class Texture {
	
	private float left, bottom, width, height;
	private TextureManager.Atlas atlas;
	
	public Texture(float left, float bottom, float width, float height, TextureManager.Atlas atlas) {
		this.left = left;
		this.bottom = 1.0f - bottom;
		this.width = width;
		this.height = -height;
		this.atlas = atlas;
	}

	public TextureManager.Atlas getAtlas() {
		return atlas;
	}
	
	public float getLeft() {
		return left;
	}
	
	public float getBottom() {
		return bottom;
	}
	
	public float getWidth() {
		return width;
	}
	
	public float getHeight() {
		return height;
	}
	
	public void incUsers() {
		atlas.incUsers();
	}
	
	public void decUsers() {
		atlas.decUsers();
	}
	

}
